package com.cskaoyan.service.wx_cart;

import com.cskaoyan.bean.bo.wx_cart.CartAddBO;
import com.cskaoyan.bean.bo.wx_cart.CartCheckoutBO;
import com.cskaoyan.bean.bo.wx_cart.CartUpdateBO;
import com.cskaoyan.bean.vo.wx_cart.CartCheckoutVO;
import com.cskaoyan.bean.vo.wx_cart.CartIndexVO;

import java.util.List;
import java.util.Map;

/**
 * @program: market
 * @description: 前台购物车服务方法
 * @author: zhong
 * @create: 2022-07-19 10:50
 **/
public interface WxCartService {
    CartIndexVO listProductsOp(int userId);

    int countProductOp(int userId);

    CartCheckoutVO listCheckoutInfoOp(CartCheckoutBO checkoutBO,int userId);

    int updateCheckedOp(Map checkedInfo,int userId);

    CartResp addOp(CartAddBO cartAddBO, int userId);

    int updateProductNumOp(CartUpdateBO updateInfo);

    int delCartOp(List<Integer> productIds,int userId);

    //用于返回到controller层的工具bean
    class CartResp {
        public int code;
        public int cartId;

        public CartResp(int code, int cartId) {
            this.code = code;
            this.cartId = cartId;
        }
    }
}
